package gameLogic;

public class Referee{
	Board b;
	Observer ob;
	
	public Referee(Board b, Observer ob) {
		this.b = b;
		this.ob = ob;
	}
	
	// 0 = game in progress
	// 111 = p1 wins
	// 222 = p2 wins
	// -1 = draw
	public int judge() {
		return 
		(ob.gameResult == 0) ?
			((b.turn >= 10) ? -1:0) : 
			ob.gameResult;
	}
}
